package BulkCmIRPSystem;


/**
 * Generated from IDL interface "BulkCmIRP".
 *
 * @author JacORB IDL compiler V 2.3.0, 17-Feb-2007
 * @version generated at 2013-5-20 22:07:19
 */

public class _BulkCmIRPStub
	extends org.omg.CORBA.portable.ObjectImpl
	implements BulkCmIRPSystem.BulkCmIRP
{
	private String[] ids = {"IDL:BulkCmIRPSystem/BulkCmIRP:1.0"};
	public String[] _ids()
	{
		return ids;
	}

	public final static java.lang.Class _opsClass = BulkCmIRPSystem.BulkCmIRPOperations.class;
	public void fallback(java.lang.String session_id) throws ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.NotValidInCurrentStateException,BulkCmIRPSystem.ConcurrencyException,BulkCmIRPSystem.FallbackException,BulkCmIRPSystem.NoFallbackException,BulkCmIRPSystem.UnknownSessionIdException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "fallback", true);
				_os.write_string(session_id);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/NotValidInCurrentStateException:1.0"))
				{
					throw BulkCmIRPSystem.NotValidInCurrentStateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/ConcurrencyException:1.0"))
				{
					throw BulkCmIRPSystem.ConcurrencyExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/FallbackException:1.0"))
				{
					throw BulkCmIRPSystem.FallbackExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/NoFallbackException:1.0"))
				{
					throw BulkCmIRPSystem.NoFallbackExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "fallback", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.fallback(session_id);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public void download(java.lang.String session_id, java.lang.String source) throws ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.NotValidInCurrentStateException,BulkCmIRPSystem.IllegalURLFormatException,BulkCmIRPSystem.DownloadException,BulkCmIRPSystem.MaxSessionReachedException,BulkCmIRPSystem.UnknownSessionIdException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "download", true);
				_os.write_string(session_id);
				_os.write_string(source);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/NotValidInCurrentStateException:1.0"))
				{
					throw BulkCmIRPSystem.NotValidInCurrentStateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalURLFormatException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalURLFormatExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/DownloadException:1.0"))
				{
					throw BulkCmIRPSystem.DownloadExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/MaxSessionReachedException:1.0"))
				{
					throw BulkCmIRPSystem.MaxSessionReachedExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "download", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.download(session_id,source);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public java.lang.String[] get_session_ids() throws BulkCmIRPSystem.GetSessionIdsException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_session_ids", true);
				_is = _invoke(_os);
				java.lang.String[] _result = BulkCmIRPConstDefs.SessionIdListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:BulkCmIRPSystem/GetSessionIdsException:1.0"))
				{
					throw BulkCmIRPSystem.GetSessionIdsExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_session_ids", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			java.lang.String[] _result;
			try
			{
				_result = _localServant.get_session_ids();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public BulkCmIRPConstDefs.SessionState get_session_status(java.lang.String session_id, org.omg.CORBA.StringHolder error_information) throws ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.GetSessionStatusException,BulkCmIRPSystem.UnknownSessionIdException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_session_status", true);
				_os.write_string(session_id);
				_is = _invoke(_os);
				BulkCmIRPConstDefs.SessionState _result = BulkCmIRPConstDefs.SessionStateHelper.read(_is);
				error_information.value = _is.read_string();
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/GetSessionStatusException:1.0"))
				{
					throw BulkCmIRPSystem.GetSessionStatusExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_session_status", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			BulkCmIRPConstDefs.SessionState _result;
			try
			{
				_result = _localServant.get_session_status(session_id,error_information);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public void get_session_log(java.lang.String sink, java.lang.String session_id, boolean only_error_info) throws ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.IllegalURLFormatException,BulkCmIRPSystem.GetSessionLogException,BulkCmIRPSystem.UnknownSessionIdException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_session_log", true);
				_os.write_string(sink);
				_os.write_string(session_id);
				_os.write_boolean(only_error_info);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalURLFormatException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalURLFormatExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/GetSessionLogException:1.0"))
				{
					throw BulkCmIRPSystem.GetSessionLogExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_session_log", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.get_session_log(sink,session_id,only_error_info);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public void activate(java.lang.String session_id, BulkCmIRPConstDefs.ActivationModeTypeOpt activation_mode, boolean fallback) throws ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.NotValidInCurrentStateException,BulkCmIRPSystem.ConcurrencyException,BulkCmIRPSystem.ActivateException,BulkCmIRPSystem.IllegalActivationModeException,ManagedGenericIRPSystem.ParameterNotSupported,BulkCmIRPSystem.UnknownSessionIdException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "activate", true);
				_os.write_string(session_id);
				BulkCmIRPConstDefs.ActivationModeTypeOptHelper.write(_os,activation_mode);
				_os.write_boolean(fallback);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/NotValidInCurrentStateException:1.0"))
				{
					throw BulkCmIRPSystem.NotValidInCurrentStateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/ConcurrencyException:1.0"))
				{
					throw BulkCmIRPSystem.ConcurrencyExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/ActivateException:1.0"))
				{
					throw BulkCmIRPSystem.ActivateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalActivationModeException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalActivationModeExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/ParameterNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.ParameterNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "activate", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.activate(session_id,activation_mode,fallback);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public ManagedGenericIRPConstDefs.Method[] get_bulk_cm_irp_notification_profile(java.lang.String bulk_cm_irp_version) throws ManagedGenericIRPSystem.InvalidParameter,ManagedGenericIRPSystem.OperationNotSupported,BulkCmIRPSystem.GetBulkCMIRPNotificationProfileException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_bulk_cm_irp_notification_profile", true);
				_os.write_string(bulk_cm_irp_version);
				_is = _invoke(_os);
				ManagedGenericIRPConstDefs.Method[] _result = ManagedGenericIRPConstDefs.MethodListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/GetBulkCMIRPNotificationProfileException:1.0"))
				{
					throw BulkCmIRPSystem.GetBulkCMIRPNotificationProfileExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_bulk_cm_irp_notification_profile", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			ManagedGenericIRPConstDefs.Method[] _result;
			try
			{
				_result = _localServant.get_bulk_cm_irp_notification_profile(bulk_cm_irp_version);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public void abort_session_operation(java.lang.String session_id) throws ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.NotValidInCurrentStateException,BulkCmIRPSystem.AbortSessionOperationException,BulkCmIRPSystem.UnknownSessionIdException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "abort_session_operation", true);
				_os.write_string(session_id);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/NotValidInCurrentStateException:1.0"))
				{
					throw BulkCmIRPSystem.NotValidInCurrentStateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/AbortSessionOperationException:1.0"))
				{
					throw BulkCmIRPSystem.AbortSessionOperationExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "abort_session_operation", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.abort_session_operation(session_id);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public void preactivate(java.lang.String session_id, BulkCmIRPConstDefs.VerificationModeTypeOpt verification_mode, BulkCmIRPConstDefs.ActivationModeTypeOpt activation_mode, boolean fallback) throws BulkCmIRPSystem.ConcurrencyException,ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.IllegalVerificationModeException,BulkCmIRPSystem.UnknownSessionIdException,BulkCmIRPSystem.PreactivateException,ManagedGenericIRPSystem.ParameterNotSupported,BulkCmIRPSystem.NotValidInCurrentStateException,ManagedGenericIRPSystem.OperationNotSupported,BulkCmIRPSystem.IllegalActivationModeException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "preactivate", true);
				_os.write_string(session_id);
				BulkCmIRPConstDefs.VerificationModeTypeOptHelper.write(_os,verification_mode);
				BulkCmIRPConstDefs.ActivationModeTypeOptHelper.write(_os,activation_mode);
				_os.write_boolean(fallback);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:BulkCmIRPSystem/ConcurrencyException:1.0"))
				{
					throw BulkCmIRPSystem.ConcurrencyExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalVerificationModeException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalVerificationModeExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/PreactivateException:1.0"))
				{
					throw BulkCmIRPSystem.PreactivateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/ParameterNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.ParameterNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/NotValidInCurrentStateException:1.0"))
				{
					throw BulkCmIRPSystem.NotValidInCurrentStateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalActivationModeException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalActivationModeExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "preactivate", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.preactivate(session_id,verification_mode,activation_mode,fallback);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public void end_session(java.lang.String session_id) throws ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.NotValidInCurrentStateException,BulkCmIRPSystem.EndSessionException,BulkCmIRPSystem.UnknownSessionIdException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "end_session", true);
				_os.write_string(session_id);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/NotValidInCurrentStateException:1.0"))
				{
					throw BulkCmIRPSystem.NotValidInCurrentStateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/EndSessionException:1.0"))
				{
					throw BulkCmIRPSystem.EndSessionExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "end_session", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.end_session(session_id);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public void start_session(java.lang.String session_id) throws BulkCmIRPSystem.SessionIdInUseException,ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.StartSessionException,BulkCmIRPSystem.MaxSessionReachedException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "start_session", true);
				_os.write_string(session_id);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:BulkCmIRPSystem/SessionIdInUseException:1.0"))
				{
					throw BulkCmIRPSystem.SessionIdInUseExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/StartSessionException:1.0"))
				{
					throw BulkCmIRPSystem.StartSessionExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/MaxSessionReachedException:1.0"))
				{
					throw BulkCmIRPSystem.MaxSessionReachedExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "start_session", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.start_session(session_id);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public void upload(java.lang.String session_id, java.lang.String sink, java.lang.String base_object, BulkCmIRPConstDefs.SearchControl search_control) throws BulkCmIRPSystem.ConcurrencyException,ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.UnknownSessionIdException,BulkCmIRPSystem.IllegalFilterFormatException,BulkCmIRPSystem.IllegalScopeLevelException,BulkCmIRPSystem.IllegalDNFormatException,BulkCmIRPSystem.NotValidInCurrentStateException,BulkCmIRPSystem.MaxSessionReachedException,BulkCmIRPSystem.IllegalURLFormatException,BulkCmIRPSystem.IllegalScopeTypeException,BulkCmIRPSystem.UploadException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "upload", true);
				_os.write_string(session_id);
				_os.write_string(sink);
				_os.write_string(base_object);
				BulkCmIRPConstDefs.SearchControlHelper.write(_os,search_control);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:BulkCmIRPSystem/ConcurrencyException:1.0"))
				{
					throw BulkCmIRPSystem.ConcurrencyExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalFilterFormatException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalFilterFormatExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalScopeLevelException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalScopeLevelExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalDNFormatException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalDNFormatExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/NotValidInCurrentStateException:1.0"))
				{
					throw BulkCmIRPSystem.NotValidInCurrentStateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/MaxSessionReachedException:1.0"))
				{
					throw BulkCmIRPSystem.MaxSessionReachedExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalURLFormatException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalURLFormatExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalScopeTypeException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalScopeTypeExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UploadException:1.0"))
				{
					throw BulkCmIRPSystem.UploadExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "upload", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.upload(session_id,sink,base_object,search_control);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public void validate(java.lang.String session_id, BulkCmIRPConstDefs.ActivationModeTypeOpt activation_mode) throws ManagedGenericIRPSystem.InvalidParameter,BulkCmIRPSystem.NotValidInCurrentStateException,ManagedGenericIRPSystem.OperationNotSupported,BulkCmIRPSystem.ConcurrencyException,BulkCmIRPSystem.IllegalActivationModeException,ManagedGenericIRPSystem.ParameterNotSupported,BulkCmIRPSystem.UnknownSessionIdException,BulkCmIRPSystem.ValidateException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "validate", true);
				_os.write_string(session_id);
				BulkCmIRPConstDefs.ActivationModeTypeOptHelper.write(_os,activation_mode);
				_is = _invoke(_os);
				return;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/NotValidInCurrentStateException:1.0"))
				{
					throw BulkCmIRPSystem.NotValidInCurrentStateExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/ConcurrencyException:1.0"))
				{
					throw BulkCmIRPSystem.ConcurrencyExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/IllegalActivationModeException:1.0"))
				{
					throw BulkCmIRPSystem.IllegalActivationModeExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/ParameterNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.ParameterNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/UnknownSessionIdException:1.0"))
				{
					throw BulkCmIRPSystem.UnknownSessionIdExceptionHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/ValidateException:1.0"))
				{
					throw BulkCmIRPSystem.ValidateExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "validate", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			try
			{
				_localServant.validate(session_id,activation_mode);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return;
		}

		}

	}

	public ManagedGenericIRPConstDefs.Method[] get_bulk_cm_irp_operation_profile(java.lang.String bulk_cm_irp_version) throws ManagedGenericIRPSystem.InvalidParameter,ManagedGenericIRPSystem.OperationNotSupported,BulkCmIRPSystem.GetBulkCMIRPOperationProfileException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_bulk_cm_irp_operation_profile", true);
				_os.write_string(bulk_cm_irp_version);
				_is = _invoke(_os);
				ManagedGenericIRPConstDefs.Method[] _result = ManagedGenericIRPConstDefs.MethodListHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:ManagedGenericIRPSystem/InvalidParameter:1.0"))
				{
					throw ManagedGenericIRPSystem.InvalidParameterHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:ManagedGenericIRPSystem/OperationNotSupported:1.0"))
				{
					throw ManagedGenericIRPSystem.OperationNotSupportedHelper.read(_ax.getInputStream());
				}
				else if( _id.equals("IDL:BulkCmIRPSystem/GetBulkCMIRPOperationProfileException:1.0"))
				{
					throw BulkCmIRPSystem.GetBulkCMIRPOperationProfileExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_bulk_cm_irp_operation_profile", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			ManagedGenericIRPConstDefs.Method[] _result;
			try
			{
				_result = _localServant.get_bulk_cm_irp_operation_profile(bulk_cm_irp_version);
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

	public java.lang.String[] get_bulk_cm_irp_versions() throws BulkCmIRPSystem.GetBulkCmIRPVersionsException
	{
		while(true)
		{
		if(! this._is_local())
		{
			org.omg.CORBA.portable.InputStream _is = null;
			try
			{
				org.omg.CORBA.portable.OutputStream _os = _request( "get_bulk_cm_irp_versions", true);
				_is = _invoke(_os);
				java.lang.String[] _result = ManagedGenericIRPConstDefs.VersionNumberSetHelper.read(_is);
				return _result;
			}
			catch( org.omg.CORBA.portable.RemarshalException _rx ){}
			catch( org.omg.CORBA.portable.ApplicationException _ax )
			{
				String _id = _ax.getId();
				if( _id.equals("IDL:BulkCmIRPSystem/GetBulkCmIRPVersionsException:1.0"))
				{
					throw BulkCmIRPSystem.GetBulkCmIRPVersionsExceptionHelper.read(_ax.getInputStream());
				}
				throw new RuntimeException("Unexpected exception " + _id );
			}
			finally
			{
				this._releaseReply(_is);
			}
		}
		else
		{
			org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_bulk_cm_irp_versions", _opsClass );
			if( _so == null )
				throw new org.omg.CORBA.UNKNOWN("local invocations not supported!");
			BulkCmIRPOperations _localServant = (BulkCmIRPOperations)_so.servant;
			java.lang.String[] _result;
			try
			{
				_result = _localServant.get_bulk_cm_irp_versions();
			}
			finally
			{
				_servant_postinvoke(_so);
			}
			return _result;
		}

		}

	}

}
